package com.jc.camerascan.activity.webview;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.webkit.JavascriptInterface;

import com.just.agentweb.core.AgentWeb;

/**
 * @Package: com.jc.camerascan.activity.webview
 * @Description: java类作用描述
 * @Author: xuchi
 * @CreateDate: 2020/7/30 2:17
 * @Version: 1.0
 */
public class AndroidInterfaceWeb {

    private AgentWeb agent;
    private Activity activity;
    //    private WebJsInterfaceCallback interfaceCallback;
    private String TAG = "AndroidInterfaceWeb";

    public AndroidInterfaceWeb(AgentWeb agent, Activity activity) {
        this.agent = agent;
        this.activity = activity;
//        this.interfaceCallback = interfaceCallback;
    }

    @JavascriptInterface
    public void hOpenSystemBrower(String url) {
        Uri uri = Uri.parse(url);
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        activity.startActivity(intent);
    }

//    public interface WebJsInterfaceCallback {
//        void doSahreInfo(ShareModel shareModel);
//        void goLogin(String jsCallback);
//    }
}

